var ec_left2 = echarts.init(document.getElementById('l2'), "dark");
var ec_left2_Option = {
	xAxis: {
    max: 'dataMax'
  },
  yAxis: {
    type: 'category',
    data: [],
    inverse: true,
    animationDuration: 300,
    animationDurationUpdate: 300,
    max: 10

  },
  series: [
    {
      showBackground: true,
      realtimeSort: true,
      name: '出版社销售量Top.10',
      type: 'bar',
      itemStyle: {
            normal: {
　　　　　　　　//这里是重点
                color: function(params) {
                	//注意，如果颜色太少的话，后面颜色不会自动循环，最好多定义几个颜色
                    var colorList = ['#c23531','#2f4554', '#61a0a8', '#d48265', '#91c7ae','#749f83', '#ca8622','#e30a1','#b22234','#ef2b2d'];
                    return colorList[params.dataIndex]
                }
            }
        },

      data: [],
      label: {
        show: true,
        position: 'right',
        valueAnimation: true
      }
    }
  ],
  legend: {
    show: true
  },
  animationDuration: 0,
  animationDurationUpdate: 500,
  animationEasing: 'linear',
  animationEasingUpdate: 'linear'
};

ec_left2.setOption(ec_left2_Option);
